<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>管理员列表</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/amazeui.min.css" />
<link rel="stylesheet" href="css/admin.css" />
</head>
<body>
	<div class="container">

		<%@include file="header.jsp"%>

		<div class="text-right">
			<a class="btn btn-warning" href="admin_add.jsp">添加管理员</a>
		</div>

		<br>

		<table class="table table-bordered table-hover">

			<tr>
				<th width="5%">ID</th>
				<th width="10%">用户名</th>
				<th width="10%">操作</th>
			</tr>

			<c:forEach var="admin" items="${adminList}">
				<tr>
					<td><p>${admin.id}</p></td>
					<td><p>${admin.username}</p></td>
					<td><c:if test="${admin.id==1}">
							<p>系统保护用户</p>
						</c:if> <c:if test="${admin.id>1}">
							<a class="btn btn-info"
								href="selByIdAdmin?id=${admin.id}&username=${admin.username}">重置密码</a>
							<a class="btn btn-danger" href="adminDelete?id=${admin.id}">删除</a>
						</c:if></td>
				</tr>
			</c:forEach>

		</table>
		<div class="am-cf" style="margin-right: 30px;">
			共 ${count } 条记录
			<div class="am-fr">
				<ul class="am-pagination">
					<li <c:if test="${curPage<=1 }">class="am-disabled"</c:if>><a
						href="adminList?page=${curPage-1 }">«</a></li>
					<c:forEach begin="1" end="${pages }" var="s">
						<li <c:if test="${curPage==s }">class="am-active"</c:if>><a
							href="adminList?page=${s }">${s }</a></li>
					</c:forEach>
					<li <c:if test="${curPage>=pages }">class="am-disabled"</c:if>>
						<a href="adminList?page=${curPage+1 }">»</a>
					</li>
				</ul>
			</div>
		</div>

		<br>${pageTool}<br>
	</div>
</body>
</html>

